<include file="Public:header" />
<script language=javascript src="__PUBLIC__/Js/wpCalendar.js"></script>
    <link rel="stylesheet" href="__PUBLIC__/layui/build/css/layui.css">
    <script src="__PUBLIC__/layui/build/layui.js" charset="utf-8"></script>
<div class="ncenter_box" style="padding:0px; width: 100%; overflow-x: hidden;">
    <div class="accounttitle"><h1>充值管理 </h1></div>
    <SCRIPT language=JavaScript>
        function notice() {
            //alert(arguments[0]);
            document.getElementById(arguments[0]).style.display = arguments[1];
        }
        function yhServer(Ful){
            str = $F(Ful).replace(/^\s+|\s+$/g,"");
            ThinkAjax.send('__APP__/Fck/check_CCuser/','ajax=1&userid='+str,'',Ful+'1');
        }
        function daxie(Ful){
            str = $F(Ful).replace(/^\s+|\s+$/g,"");
            ThinkAjax.send('__APP__/Fck/daxie/','ajax=1&money='+str,'',Ful+'1');
        }
        function checklogin() {
            if (document.myform.UserID.value=="") {
                alert("请输入会员编号!");
                myform.UserID.focus();
                return false;
            }
            if (document.myform.ePoints.value=="") {
                alert("请输入充值金额!");
                myform.ePoints.focus();
                return false;
            }

            if(confirm('温馨提示：\n\n请确认以下货币充值信息正确性！ \n\n充入会员编号： '+ document.myform.UserID.value+' \n\n充值金额： '+document.myform.ePoints.value+' 元'))
            {
                this.document.myform.submit();
                return true;
            }else{
                return false;
            }

        }
    </SCRIPT>
    <script language="JavaScript">
        ifcheck = true;
        function CheckAll(form)
        {
            for (var i=0;i<form.elements.length-2;i++)
            {
                var e = form.elements[i];
                e.checked = ifcheck;
            }
            ifcheck = ifcheck == true ? false : true;
        }
    </script>
    <style type="text/css">
        th,td{ padding: 3px 0px; word-break: break-all;}
            @media( max-width: 624px){
        .laydate_box{ left: 50% !important; margin-left: -120px !important; }
    }
    </style>
    <!--时间选择-->
    <script>
        layui.use('laydate', function(){
            var laydate = layui.laydate;
            var start = {
                min: laydate.now()
                ,max: '2099-06-16 23:59:59'
                ,istoday: false
                ,choose: function(datas){
                    end.min = datas; //开始日选好后，重置结束日的最小日期
                    end.start = datas //将结束日的初始值设定为开始日
                }
            };
            var end = {
                min: laydate.now()
                ,max: '2099-06-16 23:59:59'
                ,istoday: false
                ,choose: function(datas){
                    start.max = datas; //结束日选好后，重置开始日的最大日期
                }
            };

        });
    </script>
    <!--时间选择END-->
    <!--为会员充值部分-->
    <!-- 列表显示区域  -->
    <form id="myform" name="myform" method="post"  action="__URL__/adminCurrencyRechargeAdd" style="padding: 10px;">
        <table width="100%" class="tab4" border="0" cellpadding="0" cellspacing="0">
            <!-- <tr>
                <td width="37%" align="right">&nbsp;</td>
                <td width="63%">为商户充值</td>
            </tr> -->
            <tr>
                <td align="right">充值帐号：</td>
                <td>
                    <div style="display: inline-block"><input name="UserID" type="text" id="UserID" class="ipt" onblur="javascript:yhServer(this.name);" onfocus="notice('0','')" /></div>
                    <div style="display: inline-block"><div id="UserID1" class="info"><div id="0" class="focus_r" style="display:none;"><div class="msg_tip">请输入你要充值的帐号。</div></div></div></div>
                    <!--<input name="UserID" type="text" id="UserID" maxlength="50" />-->
                    <!--<span style="color: #FF3300;">*</span>-->
                </td>
            </tr>
            <tr>
                <td align="right">充值类型：</td>
                <td>
                    <select name="stype">
                    <!-- <option value="1">积分</option>-->
                    <!-- <option value="0">奖金币</option> -->
                    <option value="1" selected>电子币</option>
                    <!--<option value="2">充值商城金币</option>-->
                    <!--<option value="3">有效期积分</option>-->
                </select>
            </td>
            </tr>
            <tr>
                <td align="right">充值金额：</td>
                <td>
                    <div style="display: inline-block"><input name="ePoints" type="text" id="ePoints" class="ipt" onblur="javascript:daxie(this.name);" onfocus="notice('1','')" /></div>
                    <div style="display: inline-block"><div id="ePoints1" class="info"><div id="1" class="focus_r" style="display:none;"><div class="msg_tip">请输入你要充值的金额。*（要减少币值，输入负金额即可！）</div></div></div></div>
                    <!--<input name="ePoints" type="text" id="ePoints" size="10" maxlength="12" />-->
                    <!--<span style="color: #FF3300;">*（要减少币值，输入负金额即可！）</span>-->
                </td>
            </tr>
            <td align="right">&nbsp;</td>
            <td>
                        <span class="fLeft">
                             <input type="button" name="Actions" id="Actions" value="确定充值" class="bt_tj" onclick="checklogin()" style="padding: 2px 10px;border-radius: 3px;"/>
                        </span>
            </td>
            </tr>
        </table>
    </form>
    <!--为会员充值部分结束-->
    <form name="form3" method="post" action="__URL__/adminCurrencyRechargeAC" style="padding: 10px;">
        <table width="100%" class="tab3" border="0" cellpadding="0" cellspacing="0" id="tb1" bgcolor="#b9c8d0" >

            <tr class="content_td" align="center">
                <th  width="1%">
                    &nbsp;
                    <!--<input type="checkbox" name="chkall" value="checkbox" onclick="CheckAll(this.form)"  class="btn2" id="chkall" />-->
                </th>
                <th width="10%"><span>帐号</span></th>
                <th width="10%"><span>姓名</span></th>
                <th width="10%"><span>订单</span></th>
                <th width="10%"><span>金额</span></th>
                <th width="10%"><span>类型</span></th>
                <th width="10%" ><span>申请时间</span></th>
                <th width="10%"><span>确认时间</span></th>
                <!--<th nowrap ><span>账号</span></th>-->
                <th width="10%"><span>凭证</span></th>
                <th width="10%" ><span>状态</span></th>
            </tr>
            <volist name="list" id="vo">
                <tr class="content_td" align="center">
                    <td><div align="center">
                        <input type="checkbox" name="tabledb[]" value="{$vo['id']}" class="btn2" />
                    </div></td>
                    <td>{$vo['user_id']}</td>
                    <td>{$findName[$vo['id']]}</td>
                    <td>{$vo['order_id']}</td>
                    <td><span class="STYLE1">{$vo['epoint']}</span></td>
                    <!--<td><span class="STYLE1">{$vo['huikuan']|Jx_cname}</span></td>-->
                    <td>
                        <eq name="vo.stype" value="1"><font color="blue">电子币</font></eq>
                        <!-- <eq name="vo.stype" value="0"><font>奖金币</font></eq> -->
                        <eq name="vo.stype" value="2"><font color="blue">商城金币</font></eq>
                        <!-- <eq name="vo.stype" value="3"><font color="blue">有效积分</font></eq> -->
                    </td>
                    <td>{$vo.rdt|date='Y-m-d H:i:s',###}</td>
                    <td><gt name="vo.pdt" value="0">{$vo.pdt|date='Y-m-d H:i:s',###}</gt></td>
                    <!--<td>{$vo['zhuanghao']}</td>-->
                    <td>
                        <if condition="$vo['img'] neq null">
                            <font style="color: #0000B0"><a href="__URL__/look_big/oid/{$vo.id}" target="_blank">查看</a></font>
                            <else/>
                            未上传
                        </if>
                    </td>
                    <td><eq name="vo['is_pay']" value="1"><span style="color: #F00;"><font style="color: blue;">已确认</font></span></eq><eq name="vo['is_pay']" value="0"><span style="color: #090;">未确认</span></eq></td>
                </tr>
            </volist>


            <tr>
                <td colspan="9">
                    <input name="全选" type="button" class="bt_tj" id="全选" onclick="CheckAll(this.form)" value="全选" style="padding: 2px 10px;border-radius: 3px;"/>	  &nbsp; &nbsp;
                    <input type="submit" name="action" value="确认" class="bt_tj" onclick="{if(confirm('确定吗?')){return true;}return false;}" style="padding: 2px 10px;border-radius: 3px;" >
                    &nbsp; &nbsp;
                    <input type="submit" name="action" value="删除" class="bt_tj" onclick="{if(confirm('确定删除吗?')){return true;}return false;}" style="padding: 2px 10px;border-radius: 3px;"></td>
                </td>

            </tr>

        </table>
    </form>
    <table width="100%" class="tab3_bottom" border="0" cellpadding="0" cellspacing="0">
        <tr>
            <td width="50%">
            </td>
            </td>
            <td width="50%">{$page}</td>
        </tr>
    </table>

    <table width="100%" align="center">
        <tr>
            <td>&nbsp;</td>
        </tr>
        <style>
            .info p{
                float: left;
            }
            .info{
                margin-top:10px;
            }
        </style>
        <tr>
            <td align="center">
                <form method='post' action="__URL__/adminCurrencyRecharge" style="padding: 10px;">
                    <div style="width: 300px;margin: 0 auto;">
                        <div class="info">
                            <p>开始日期：</p>
                            <input name="sNowDate" type="text" id="sNowDate" readonly value="{$sNowDate}" onclick="layui.laydate({elem: this, festival: true})" style="background: #f9d2f4;"/>
                          <!--   <input name="sNowDate" type="text" id="sNowDate" onFocus="showCalendar(this)" readonly style="background: #f9d2f4;" value="{$sNowDate}"/> -->
                        </div>
                        <div style="clear: both"></div>
                        <div class="info">
                            <p>结束日期：</p>
                            <input name="endNowDate" type="text" id="endNowDate" readonly value="{$endNowDate}" onclick="layui.laydate({elem: this, festival: true})" style="background: #f9d2f4;"/>
                            <!-- <input name="endNowDate" type="text" id="endNowDate" onFocus="showCalendar(this)" readonly style="background: #f9d2f4;" value="{$endNowDate}"/> -->
                        </div>
                        <div style="clear: both"></div>
                        <div class="info">
                            <p>会员编号：</p>
                            <input name="UserID" type="text" id="UserID" title="帐号查询" maxlength="50" style="background: #cbc893;" value="{$UserID}">
                        </div>
                        <div style="clear: both"></div>
                        <div class="info">
                            <p>  订单编号：</p>
                            <input name="order_id" type="text" id="order_id" title="订单查询" maxlength="50" style="background: #cbc893;" value="{$order_id}">
                        </div>
                        <div style="clear: both"></div>
                        <div class="info">
                            <p> 确认状态：</p>
                            <select name="is_pay" id="" style="background: #cbc893;width:130px;">
                                <option value="0">全部</option>
                                <option value="1" <eq name="is_pay" value="1">selected</eq> >已确认</option>
                                <option value="2" <eq name="is_pay" value="2">selected</eq> >未确认</option>
                            </select>
                        </div>
                        <input type="submit" name="Submit" value="搜索" class="bt_tj" style="padding: 2px 10px;border-radius: 3px;margin-top: 5px" />
                    </div>
                </form>
            </td>
        </tr>
    </table>
    <div class="bottom"></div>
</div>
<div style="height: 100px;"></div>

<include file="Public:footer" />